package com.tianqingwl.gsystem.content.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.tianqingwl.gsystem.content.pojo.ContentInfo;
import com.tianqingwl.gsystem.content.pojo.ContentType;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ContentInfoMapper extends BaseMapper<ContentInfo> {
    List<ContentInfo> selectNearContent(Long contentId);

    void updateViewCount(Long contentId);

    IPage<ContentType> listContentTagPage(IPage<ContentInfo> contentTypePage,@Param(Constants.WRAPPER) QueryWrapper<ContentInfo> queryWrapper);

    /**
     * 更新内容类型
     * @param contentType
     */
    void updateContentType(ContentType contentType);
}
